package net.gcmz.zrqblog.web;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import net.gcmz.zrqblog.entity.User;
import net.gcmz.zrqblog.service.UserService;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

@RequestMapping("users")
@Controller
public class UserController {
	
	@Autowired
	private UserService userService;
	
	@RequestMapping(value="/findAllByIdAndName.do")  
	public User findAllByIdAndName(HttpServletRequest request,HttpServletResponse response,Long id,String name) {
	
		User user=new User();
		user=userService.findAllByIdAndName(id, name);
		return user;
		
	}
}
